import type { App } from 'vue'
import { debounce } from '@/directives/debounce'
import { throttle } from '@/directives/throttle'

/**
 * 注册全局自定义指令
 * @param app
 */
export const setupDirectives = (app: App) => {
  // 防抖指令
  app.directive('debounce', debounce)
  // 节流指令
  app.directive('throttle', throttle)
}
